#ifndef WORLD_H
#define WORLD_H

#include <vector>
#include <list>
#include "cell.h"
#include "Common.h"

class World
{
public:
    World(int row, int col);
    void step();

    void setCellStatus(int row, int col, Cell::CellStatus status);
    void reverseCellStatus(int row, int col);
    const CellContainer& getActiveCells();
private:
    void init(int row, int col);
    std::vector< std::vector <Cell> > m_cells;
    CellContainer m_cc;

    int getNeighbourLive(int r, int c);

    int m_row;
    int m_col;
};

#endif // WORLD_H
